package name.bingo.bing.pay.service.trade.controller;/**
 * create by yanbing on 2018/11/9 10:16
 */

import name.bingo.bing.pay.service.trade.dao.TradeDao;
import name.bingo.bing.pay.utils.IdGen;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @param:
 * @return:
 * @auther: yanbing
 * @date: 2018/11/9 10:16
 **/
@RestController
@RequestMapping("trade")
public class TradeController {
    @Autowired
    private TradeDao tradeDao;

    @RequestMapping("init")
    public int orderInit(){
        Map<String,Object> order=new HashMap<String,Object>();
        order.put("id",IdGen.idGen());
        order.put("status","c010101");
        order.put("userId","10001");
        order.put("orderAmount",new BigDecimal(10));
        return tradeDao.orderInit(order);
    }
}
